home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.lanl.gov!tanmoy
- From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- Newsgroups: comp.lang.c
- Subject: Re: Standard question - pointer initialization
- Date: 06 Mar 1996 20:05:57 GMT
- Organization: Los Alamos National Laboratory
- Message-ID: <TANMOY.96Mar6130557@qcd.lanl.gov>
- References: <4hk9un$906@hammer.msfc.nasa.gov>
- NNTP-Posting-Host: qcd.lanl.gov
- Mime-Version: 1.0
- Content-Type: text
- In-reply-to: Brian.Day@msfc.nasa.gov's message of 6 Mar 1996 15:11:19 GMT
-
- In article <4hk9un$906@hammer.msfc.nasa.gov>
- Brian.Day@msfc.nasa.gov (Brian Day) writes:
-
- <snip>
- BD: We were recently handed a coding standard which said:
- BD:
- BD: "Always initialize pointers when they are declared"
- BD:
- BD: Doesn't the standard say something about some pointers
- BD: being automatically initialized to NULL, or something like that?
-
- Variables of static duration are always initialized automatically: the
- net result is the same as initialized by typing = 0 (or {0} etc.)
- after it. So, such pointer variables are initialized to NULL portably.
-
- Cheers
- Tanmoy
- --
- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
- Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
- <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
- internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
-